package com.example.permissionservice.mapper;

import com.example.permissionservice.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface UserRoleMapper {
    UserRole findById(@Param("id") Long id);

    List<UserRole> findByUserId(@Param("userId") Long userId);

    List<UserRole> findByRoleCode(@Param("roleCode") String roleCode);

    int insert(UserRole userRole);

    int update(UserRole userRole);

    int deleteById(@Param("id") Long id);

    int deleteByUserId(@Param("userId") Long userId);
}